package com.yh.dp.principle.lsp;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName LSP2
 * @Description TODO
 * @Author 0715-YuHao
 * @Date 2021/1/3 15:32
 */
public class LSP2 {

    abstract class Parent {
        public abstract Map fun();
    }
    class Sub extends Parent{
        @Override
        public HashMap fun(){
            HashMap b=new HashMap();
            b.put("b","子类被执行...");
            return b;
        }
    }
    public static void main(String[] args){
        LSP2 lsp =new LSP2();
        Parent a = lsp.new Sub();
        System.out.println(a.fun());
    }

}
